package com.project.security.action;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
@SuppressWarnings("unused")
public class UsersAction {
	@RequestMapping(value = "/loginSucc", method = RequestMethod.GET)
	public ModelAndView query(HttpServletRequest request,
			HttpServletResponse response, ModelMap modelMa) throws IOException {
		String username = request.getParameter("username");
		String password = request.getParameter("password");
		
		ModelAndView mv = new ModelAndView("/manage/ManageIndex.jsp");
		return mv;
	}
	
	@RequestMapping(value = "/loginFail", method = RequestMethod.GET)
	public ModelAndView fail(HttpServletRequest request,
			HttpServletResponse response, ModelMap modelMa) throws IOException {
		
		
		ModelAndView mv = new ModelAndView("/login.jsp");
		return mv;
	}
}
